package com.cybertron.ironhide.spider.plugin.impl;

import java.util.List;
import java.util.Map;

import com.cybertron.ironhide.spider.SpiderListener;
import com.cybertron.ironhide.spider.fetcher.Page;
import com.cybertron.ironhide.spider.plugin.ParsePoint;
import com.cybertron.ironhide.spider.plugin.util.ModelParser;
import com.cybertron.ironhide.spider.task.Task;
import com.cybertron.ironhide.spider.xml.Site;
import com.cybertron.ironhide.spider.xml.Target;

public class ParsePointImpl implements ParsePoint {

	private SpiderListener listener;

	public void init(Site siteManager, SpiderListener listener) {
		this.listener = listener;
	}

	public void destroy() {
	}

	public List<Map<String, Object>> parse(Task task, Target target, Page page)
			throws Exception {
		List<Map<String, Object>> results = new ModelParser(task, target,
				listener).parse(page);
		return results;
	}

}
